package com.kuang.factoryMethod;

import com.kuang.factoryMethod.impl.DaZhongFactory;
import com.kuang.factoryMethod.impl.TeslaFactory;
import com.kuang.factoryMethod.impl.WulingFactory;
import com.kuang.service.Car;

/**
 * @author zhaoxiang
 * @version 1.0
 * @description
 * @Date 2020/8/2 14:02
 */
public class FactoryMethodClient {
    public static void main(String[] args) {
        CarFactory daZhongFactory = new DaZhongFactory();
        CarFactory teslaFactory = new TeslaFactory();
        CarFactory wulingFactory = new WulingFactory();

        Car car = daZhongFactory.getCar();
        Car car1 = teslaFactory.getCar();
        Car car2 = wulingFactory.getCar();

        car.getCar();
        car1.getCar();
        car2.getCar();
    }
}
